#ifndef GRAPHICSSCENE_H
#define GRAPHICSSCENE_H

#include <QObject>
#include <QGraphicsScene>
#include "ui_MainWindow.h"
#include "Marker.h"

class GraphicsScene: public QGraphicsScene
{
    Q_OBJECT

public:
    GraphicsScene(QObject *parent = 0);
private:
    void  setZValue(int z);
    void  addMarker(QPointF *xy);
    void  setupMarker(Marker *marker,QPointF *xy);
    void  bringToFront();
    void  sendToBack();
    Marker *selectedMarker() const;

    QAction *sendToBackAction;
    QAction *deleteAction;
    QAction *bringToFrontAction;

    int minZ;
    int maxZ;
    int seqNumber;

signals:
    void markerPos(qreal xpos, qreal ypos);

protected:
    void mouseDoubleClickEvent( QGraphicsSceneMouseEvent * event );
};

#endif // GRAPHICSSCENE_H
